Skip to content

feat: implemented mobile header, fixed item sizing on mobile#163

Open
negimox wants to merge 2 commits into
DjedAlliance:mainfrom
negimox:feat/mobile_ui
Open

feat: implemented mobile header, fixed item sizing on mobile#163
negimox wants to merge 2 commits into
DjedAlliance:mainfrom
negimox:feat/mobile_ui

Conversation

@negimox

@negimox negimox commented Dec 14, 2025

Copy link
Copy Markdown

For issue #162
Screenshot 2025-12-14 at 9 42 39 AM
Screenshot 2025-12-14 at 9 42 34 AM

Summary by CodeRabbit

  • Style
    • Enhanced responsive design with new standardized breakpoints and reusable responsive helpers for consistent behavior across device sizes.
    • Global layout and reset improvements (box-sizing, full-height/width base) plus min-height and flexible spacing for more reliable page flow.
    • Mobile-first header, navigation, dropdown and overlay adjustments for improved access and stacking.
    • Button, menu, popover and component spacing refinements for larger touch targets and balanced typography on smaller screens.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel

vercel Bot commented Dec 14, 2025

Copy link
Copy Markdown

@negimox is attempting to deploy a commit to the djed-solidity Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Dec 14, 2025

Copy link
Copy Markdown

Walkthrough

Adds standardized responsive breakpoints and mixins, global box-sizing and html/body resets, and numerous SCSS responsive adjustments across app and component styles to refine header, layout, navigation, and component sizing/spacing for tablet and mobile viewports.

Changes

Cohort / File(s) Summary
Responsive breakpoints & mixins
src/scss/_general_styling.scss
Adds five Sass breakpoint variables ($breakpoint-sm/md/lg/xl/xxl) and five media-query mixins (on-mobile, on-tablet-sm, on-tablet, on-desktop, on-desktop-lg).
Global resets
src/index.css
Adds *, *::before, *::after { box-sizing: border-box }; expands html, body reset with padding:0, width:100%, height:100%; adds overflow-x: hidden for desktop via media query.
App-level responsive styling
src/App.scss
Extensive responsive layout updates (breakpoints ~425/600/768/1024px): header, logo, site layout, ant-layout, navigation, mobile header/dropdown behaviors, z-index and padding adjustments.
Component responsive tweaks
src/components/atoms/CustomButton/_CustomButton.scss, src/components/molecules/BuySellButton/BuySellButton.scss, src/components/molecules/BuySellCoin/_BuySellCoin.scss, src/components/molecules/MetamaskStatusButton/_MetamaskStatusButton.scss
Introduces responsive blocks (commonly 768px, 600px, 425px) adjusting heights, paddings, font-sizes, margins, border-radius, and white-space to improve tablet/mobile presentation.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Check consistency of breakpoint variable usage across App.scss and component SCSS files.
  • Verify global box-sizing/html/body changes don't conflict with third-party libraries or reset expectations.
  • Review z-index and fixed-position mobile header/dropdown rules for overlap and stacking issues.
  • Validate button sizing/padding across breakpoints to ensure no text truncation or overflow.

Poem

🐇 I nibble styles in moonlit light,
Breakpoints stitched to snug each sight.
Padding trimmed and headers small,
Mobile dances, screens stand tall.
Hooray — a CSS carrot for all! 🥕

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main changes: a mobile header implementation and responsive item sizing adjustments across multiple components on mobile devices.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 952188f and d3b8dc9.

📒 Files selected for processing (2)
  • src/components/molecules/MetamaskStatusButton/_MetamaskStatusButton.scss (1 hunks)
  • src/index.css (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/components/molecules/MetamaskStatusButton/_MetamaskStatusButton.scss
  • src/index.css

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/components/molecules/BuySellButton/BuySellButton.scss (1)

66-69: Remove empty placeholder classes.

Lines 66-69 contain empty CSS classes that serve no styling purpose and should either be implemented with styles or removed entirely. These appear to be placeholders that have been left in production code.

🧹 Nitpick comments (5)
src/components/atoms/CustomButton/_CustomButton.scss (1)

20-42: Prefer responsive mixins over hardcoded media queries.

The responsive styling is logically sound, but the file imports _general_styling.scss which provides reusable responsive mixins (@mixin on-tablet, @mixin on-mobile) that match these exact breakpoints. Using the mixins would improve maintainability and reduce duplication across the codebase.

Consider refactoring to use:

@include on-tablet {
  .CustomButton {
    height: 45px;
    // ...
  }
}

@include on-mobile {
  .CustomButton {
    height: 40px;
    // ...
  }
}

This pattern is consistent with the responsive design system introduced in this PR.

src/components/molecules/BuySellCoin/_BuySellCoin.scss (1)

51-92: Font sizes may be too small on smallest viewport; verify readability.

The responsive scaling down to 10px (AdditionalInfo at line 88) on the smallest breakpoint (425px) may impact legibility. While the PR aims to fit content on mobile, ensure that at least 12px (or your minimum accessibility standard) is maintained for body text.

Additionally, as with other component files, consider using the responsive mixins (@mixin on-tablet, @mixin on-mobile) rather than hardcoded media queries for consistency with the new responsive design system.

src/components/molecules/BuySellButton/BuySellButton.scss (1)

33-64: Responsive scaling is well-designed; align with responsive mixins system.

The progressive responsive adjustments across three breakpoints (768px, 600px, 425px) are logically sound and follow a consistent pattern. However:

  1. The 600px breakpoint is a custom addition not part of the standardized breakpoint set in _general_styling.scss ($breakpoint-md is 600px but the mixins may not clearly map to this). Consider whether this should use a named mixin for clarity.

  2. Continue using @mixin on-tablet, @mixin on-tablet-sm, and @mixin on-mobile instead of hardcoded media queries for consistency.

src/App.scss (1)

334-417: Mobile header implementation is well-structured; verify z-index and positioning.

The mobile header implementation introduces a sophisticated z-index hierarchy (1000, 1001, 1003) for stacking the dropdown, header, and icons. The structure appears correct:

  • .menu-mobile-dropdown: z-index 1000 (overlay)
  • .ant-layout-header.header-desktop: hidden at 600px
  • .header-mobile: z-index 1001 (header layer)
  • Logo/icons: z-index 1003 (above dropdown)

However, verify the following:

  1. Positioning brittleness: The dropdown's fixed top position (72px at 600px breakpoint, 62px at 425px) assumes a specific header height. If header padding changes, the dropdown position becomes misaligned. Consider using JavaScript to calculate the offset dynamically or using a more flexible approach (e.g., CSS custom properties).

  2. Responsive mixins: Continue using @mixin on-tablet-sm and @mixin on-mobile for consistency instead of hardcoded media queries.

src/scss/_general_styling.scss (1)

16-52: Excellent responsive design system foundation.

The breakpoint variables and responsive mixins are well-structured and provide a solid foundation for responsive design. The five breakpoints cover the typical responsive spectrum (mobile, tablet, desktop, large desktop), and the naming convention is clear and intuitive.

However, note: While this system is defined here, the component files across the PR (CustomButton, BuySellCoin, MetamaskStatusButton, BuySellButton, and App.scss) all use hardcoded @media queries instead of the provided mixins. This creates a "defined but underutilized" pattern.

Recommendation: In follow-up PRs, refactor component files to use these mixins consistently (e.g., @include on-mobile { ... } instead of @media (max-width: 425px) { ... }). This will improve maintainability and ensure breakpoints are centrally managed.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e46b850 and 952188f.

📒 Files selected for processing (7)
  • src/App.scss (3 hunks)
  • src/components/atoms/CustomButton/_CustomButton.scss (1 hunks)
  • src/components/molecules/BuySellButton/BuySellButton.scss (1 hunks)
  • src/components/molecules/BuySellCoin/_BuySellCoin.scss (1 hunks)
  • src/components/molecules/MetamaskStatusButton/_MetamaskStatusButton.scss (2 hunks)
  • src/index.css (1 hunks)
  • src/scss/_general_styling.scss (1 hunks)
🔇 Additional comments (4)
src/index.css (1)

1-18: Verify overflow-x: hidden necessity; may mask mobile scroll issues.

Setting overflow-x: hidden globally is a strong constraint that will hide horizontal overflow. While this prevents unintended horizontal scrolling, it can also mask mobile layout issues where content legitimately overflows. Ensure this is intentional and that mobile components don't have content that needs horizontal scrolling (e.g., tables, carousels).

Additionally, height: 100% on html and body may create rigid layout constraints if content grows beyond the viewport. Consider whether min-height: 100vh would be more appropriate for layouts with flexible content.

src/components/atoms/CustomButton/_CustomButton.scss (1)

12-12: Good addition of white-space: nowrap.

This prevents text wrapping in buttons and improves layout stability on mobile.

src/App.scss (2)

16-16: Excellent responsive logo sizing with flex-shrink: 0 and height: auto.

The logo scaling across breakpoints (80px → 40px → 35px) with proper flex properties prevents unwanted compression and maintains aspect ratio. This is a well-implemented responsive component.

Also applies to: 20-20, 29-30


376-410: Verify dropdown menu overlay width and mobile behavior.

The dropdown menu is set to width: 100vw (line 381) with position: fixed positioned at left/right 0. While this creates a full-width overlay, verify:

  1. Interaction with the global overflow-x: hidden (may prevent scrollable content within dropdown if needed)
  2. Whether the dropdown should allow vertical scrolling if menu items exceed viewport height (currently no scroll directive on .ant-dropdown-menu)
  3. The background: rgba(0, 0, 0, 0.95) overlay may hide content behind it unexpectedly on long menus

Consider adding max-height and overflow-y: auto to .menu-mobile-dropdown if the menu items might exceed viewport height.

Comment thread src/App.scss
Comment thread src/components/molecules/MetamaskStatusButton/_MetamaskStatusButton.scss Outdated
@negimox

negimox commented Dec 14, 2025

Copy link
Copy Markdown
Author

Hey, @Zahnentferner @yogesh0509 could you please review the PR?

@negimox

negimox commented Dec 14, 2025

Copy link
Copy Markdown
Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Dec 14, 2025

Copy link
Copy Markdown
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant